﻿using System;
using System.Text;

namespace OpenSunTracker.RestClient
{
    /// <summary>
    /// represents the ethernet-configuration
    /// </summary>
    public class EthernetConfiguration
    {
        #region CTOR

        public EthernetConfiguration()
        {
            UseStatic = string.Empty;
            IP = string.Empty;
            Mask = string.Empty;
            Dns = string.Empty;
            Gateway = string.Empty;
        }
        #endregion

        #region Properties

        /// <summary>
        /// flag, for using static ip-address configuration
        /// </summary>
        public string UseStatic { get; set; }

        /// <summary>
        /// static ip-address
        /// </summary>
        public string IP { get; set; }

        /// <summary>
        /// subnet mask
        /// </summary>
        public string Mask { get; set; }

        /// <summary>
        /// dns server
        /// </summary>
        public string Dns { get; set; }

        /// <summary>
        /// default-gateway
        /// </summary>
        public string Gateway { get; set; }

        #endregion

        #region Methods


        public override string ToString()
        {
            var str = new StringBuilder();

            str.AppendLine();
            str.AppendLine("UseStatic: " + UseStatic);
            str.AppendLine("IP: " + IP);
            str.AppendLine("Mask: " + Mask);
            str.AppendLine("Dns: " + Dns);
            str.AppendLine("Gateway: " + Gateway);

            return str.ToString();
        }

        #endregion
    }
}
